home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / windowwatcher / nsIPromptService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  26KB  |  472 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPromptService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPromptService_h__
  6. #define __gen_nsIPromptService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMWindow; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIPromptService */
  21. #define NS_IPROMPTSERVICE_IID_STR "1630c61a-325e-49ca-8759-a31b16c47aa5"
  22.  
  23. #define NS_IPROMPTSERVICE_IID \
  24.   {0x1630c61a, 0x325e, 0x49ca, \
  25.     { 0x87, 0x59, 0xa3, 0x1b, 0x16, 0xc4, 0x7a, 0xa5 }}
  26.  
  27. /**
  28.  * This is the interface to the embeddable prompt service; the service that
  29.  * implements nsIPrompt.  Its interface is designed to be just nsIPrompt, each
  30.  * method modified to take a parent window parameter.
  31.  *
  32.  * Accesskeys can be attached to buttons and checkboxes by inserting an &
  33.  * before the accesskey character in the checkbox message or button title.  For
  34.  * a real &, use && instead.  (A "button title" generally refers to the text
  35.  * label of a button.)
  36.  *
  37.  * One note: in all cases, the parent window parameter can be null.  However,
  38.  * these windows are all intended to have parents.  So when no parent is
  39.  * specified, the implementation should try hard to find a suitable foster
  40.  * parent.
  41.  *
  42.  * Implementations are free to choose how they present the various button
  43.  * types.  For example, while prompts that give the user a choice between OK
  44.  * and Cancel are required to return a boolean value indicating whether or not
  45.  * the user accepted the prompt (pressed OK) or rejected the prompt (pressed
  46.  * Cancel), the implementation of this interface could very well speak the
  47.  * prompt to the user instead of rendering any visual user-interface.  The
  48.  * standard button types are merely idioms used to convey the nature of the
  49.  * choice the user is to make.
  50.  *
  51.  * Because implementations of this interface may loosely interpret the various
  52.  * button types, it is advised that text messages passed to these prompts do
  53.  * not refer to the button types by name.  For example, it is inadvisable to
  54.  * tell the user to "Press OK to proceed."  Instead, such a prompt might be
  55.  * rewritten to ask the user: "Would you like to proceed?"
  56.  *
  57.  * @status FROZEN
  58.  */
  59. class NS_NO_VTABLE nsIPromptService : public nsISupports {
  60.  public: 
  61.  
  62.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROMPTSERVICE_IID)
  63.  
  64.   /**
  65.    * Puts up an alert dialog with an OK button.
  66.    *
  67.    * @param aParent
  68.    *        The parent window or null.
  69.    * @param aDialogTitle
  70.    *        Text to appear in the title of the dialog.
  71.    * @param aText
  72.    *        Text to appear in the body of the dialog.
  73.    */
  74.   /* void alert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  75.   NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) = 0;
  76.  
  77.   /**
  78.    * Puts up an alert dialog with an OK button and a labeled checkbox.
  79.    *
  80.    * @param aParent
  81.    *        The parent window or null.
  82.    * @param aDialogTitle
  83.    *        Text to appear in the title of the dialog.
  84.    * @param aText
  85.    *        Text to appear in the body of the dialog.
  86.    * @param aCheckMsg
  87.    *        Text to appear with the checkbox.
  88.    * @param aCheckState
  89.    *        Contains the initial checked state of the checkbox when this method
  90.    *        is called and the final checked state after this method returns.
  91.    */
  92.   /* void alertCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  93.   NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) = 0;
  94.  
  95.   /**
  96.    * Puts up a dialog with OK and Cancel buttons.
  97.    *
  98.    * @param aParent
  99.    *        The parent window or null.
  100.    * @param aDialogTitle
  101.    *        Text to appear in the title of the dialog.
  102.    * @param aText
  103.    *        Text to appear in the body of the dialog.
  104.    *
  105.    * @return true for OK, false for Cancel
  106.    */
  107.   /* boolean confirm (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  108.   NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) = 0;
  109.  
  110.   /**
  111.    * Puts up a dialog with OK and Cancel buttons and a labeled checkbox.
  112.    *
  113.    * @param aParent
  114.    *        The parent window or null.
  115.    * @param aDialogTitle
  116.    *        Text to appear in the title of the dialog.
  117.    * @param aText
  118.    *        Text to appear in the body of the dialog.
  119.    * @param aCheckMsg
  120.    *        Text to appear with the checkbox.
  121.    * @param aCheckState
  122.    *        Contains the initial checked state of the checkbox when this method
  123.    *        is called and the final checked state after this method returns.
  124.    *
  125.    * @return true for OK, false for Cancel
  126.    */
  127.   /* boolean confirmCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  128.   NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  129.  
  130.   /**
  131.    * Button Flags
  132.    *
  133.    * The following flags are combined to form the aButtonFlags parameter passed
  134.    * to confirmEx.  See confirmEx for more information on how the flags may be
  135.    * combined.
  136.    */
  137. /**
  138.    * Button Position Flags
  139.    */
  140.   enum { BUTTON_POS_0 = 1U };
  141.  
  142.   enum { BUTTON_POS_1 = 256U };
  143.  
  144.   enum { BUTTON_POS_2 = 65536U };
  145.  
  146.   /**
  147.    * Button Title Flags (used to set the labels of buttons in the prompt)
  148.    */
  149.   enum { BUTTON_TITLE_OK = 1U };
  150.  
  151.   enum { BUTTON_TITLE_CANCEL = 2U };
  152.  
  153.   enum { BUTTON_TITLE_YES = 3U };
  154.  
  155.   enum { BUTTON_TITLE_NO = 4U };
  156.  
  157.   enum { BUTTON_TITLE_SAVE = 5U };
  158.  
  159.   enum { BUTTON_TITLE_DONT_SAVE = 6U };
  160.  
  161.   enum { BUTTON_TITLE_REVERT = 7U };
  162.  
  163.   enum { BUTTON_TITLE_IS_STRING = 127U };
  164.  
  165.   /**
  166.    * Button Default Flags (used to select which button is the default one)
  167.    */
  168.   enum { BUTTON_POS_0_DEFAULT = 0U };
  169.  
  170.   enum { BUTTON_POS_1_DEFAULT = 16777216U };
  171.  
  172.   enum { BUTTON_POS_2_DEFAULT = 33554432U };
  173.  
  174.   /**
  175.    * Causes the buttons to be initially disabled.  They are enabled after a
  176.    * timeout expires.  The implementation may interpret this loosely as the
  177.    * intent is to ensure that the user does not click through a security dialog
  178.    * too quickly.  Strictly speaking, the implementation could choose to ignore
  179.    * this flag.
  180.    */
  181.   enum { BUTTON_DELAY_ENABLE = 67108864U };
  182.  
  183.   /**
  184.    * Selects the standard set of OK/Cancel buttons.
  185.    */
  186.   enum { STD_OK_CANCEL_BUTTONS = 513U };
  187.  
  188.   /**
  189.    * Selects the standard set of Yes/No buttons.
  190.    */
  191.   enum { STD_YES_NO_BUTTONS = 1027U };
  192.  
  193.   /**
  194.    * Puts up a dialog with up to 3 buttons and an optional, labeled checkbox.
  195.    *
  196.    * @param aParent
  197.    *        The parent window or null.
  198.    * @param aDialogTitle
  199.    *        Text to appear in the title of the dialog.
  200.    * @param aText
  201.    *        Text to appear in the body of the dialog.
  202.    * @param aButtonFlags
  203.    *        A combination of Button Flags.
  204.    * @param aButton0Title
  205.    *        Used when button 0 uses TITLE_IS_STRING
  206.    * @param aButton1Title
  207.    *        Used when button 1 uses TITLE_IS_STRING
  208.    * @param aButton2Title
  209.    *        Used when button 2 uses TITLE_IS_STRING
  210.    * @param aCheckMsg
  211.    *        Text to appear with the checkbox.  Null if no checkbox.
  212.    * @param aCheckState    
  213.    *        Contains the initial checked state of the checkbox when this method
  214.    *        is called and the final checked state after this method returns.
  215.    *
  216.    * @return index of the button pressed.
  217.    *
  218.    * Buttons are numbered 0 - 2. The implementation can decide whether the
  219.    * sequence goes from right to left or left to right.  Button 0 is the
  220.    * default button unless one of the Button Default Flags is specified.
  221.    *
  222.    * A button may use a predefined title, specified by one of the Button Title
  223.    * Flags values.  Each title value can be multiplied by a position value to
  224.    * assign the title to a particular button.  If BUTTON_TITLE_IS_STRING is
  225.    * used for a button, the string parameter for that button will be used.  If
  226.    * the value for a button position is zero, the button will not be shown.
  227.    *
  228.    * In general, aButtonFlags is constructed per the following example:
  229.    *
  230.    *   aButtonFlags = (BUTTON_POS_0) * (BUTTON_TITLE_AAA) +
  231.    *                  (BUTTON_POS_1) * (BUTTON_TITLE_BBB) +
  232.    *                   BUTTON_POS_1_DEFAULT;
  233.    *
  234.    * where "AAA" and "BBB" correspond to one of the button titles.
  235.    */
  236.   /* PRInt32 confirmEx (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */
  237.   NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) = 0;
  238.  
  239.   /**
  240.    * Puts up a dialog with an edit field and an optional, labeled checkbox.
  241.    *
  242.    * @param aParent
  243.    *        The parent window or null.
  244.    * @param aDialogTitle
  245.    *        Text to appear in the title of the dialog.
  246.    * @param aText
  247.    *        Text to appear in the body of the dialog.
  248.    * @param aValue
  249.    *        Contains the default value for the dialog field when this method
  250.    *        is called (null value is ok).  Upon return, if the user pressed
  251.    *        OK, then this parameter contains a newly allocated string value.
  252.    *        Otherwise, the parameter's value is unmodified.
  253.    * @param aCheckMsg
  254.    *        Text to appear with the checkbox.  If null, check box will not be shown.
  255.    * @param aCheckState
  256.    *        Contains the initial checked state of the checkbox when this method
  257.    *        is called and the final checked state after this method returns.
  258.    *
  259.    * @return true for OK, false for Cancel.
  260.    */
  261.   /* boolean prompt (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */
  262.   NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  263.  
  264.   /**
  265.    * Puts up a dialog with an edit field, a password field, and an optional,
  266.    * labeled checkbox.
  267.    *
  268.    * @param aParent
  269.    *        The parent window or null.
  270.    * @param aDialogTitle
  271.    *        Text to appear in the title of the dialog.
  272.    * @param aText
  273.    *        Text to appear in the body of the dialog.
  274.    * @param aUsername
  275.    *        Contains the default value for the username field when this method
  276.    *        is called (null value is ok).  Upon return, if the user pressed OK,
  277.    *        then this parameter contains a newly allocated string value.
  278.    *        Otherwise, the parameter's value is unmodified.
  279.    * @param aPassword
  280.    *        Contains the default value for the password field when this method
  281.    *        is called (null value is ok).  Upon return, if the user pressed OK,
  282.    *        then this parameter contains a newly allocated string value.
  283.    *        Otherwise, the parameter's value is unmodified.
  284.    * @param aCheckMsg
  285.    *        Text to appear with the checkbox.  If null, check box will not be shown.
  286.    * @param aCheckState
  287.    *        Contains the initial checked state of the checkbox when this method
  288.    *        is called and the final checked state after this method returns.
  289.    *
  290.    * @return true for OK, false for Cancel.
  291.    */
  292.   /* boolean promptUsernameAndPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  293.   NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  294.  
  295.   /**
  296.    * Puts up a dialog with a password field and an optional, labeled checkbox.
  297.    *
  298.    * @param aParent
  299.    *        The parent window or null.
  300.    * @param aDialogTitle
  301.    *        Text to appear in the title of the dialog.
  302.    * @param aText
  303.    *        Text to appear in the body of the dialog.
  304.    * @param aPassword
  305.    *        Contains the default value for the password field when this method
  306.    *        is called (null value is ok).  Upon return, if the user pressed OK,
  307.    *        then this parameter contains a newly allocated string value.
  308.    *        Otherwise, the parameter's value is unmodified.
  309.    * @param aCheckMsg
  310.    *        Text to appear with the checkbox.  If null, check box will not be shown.
  311.    * @param aCheckState
  312.    *        Contains the initial checked state of the checkbox when this method
  313.    *        is called and the final checked state after this method returns.
  314.    *
  315.    * @return true for OK, false for Cancel.
  316.    */
  317.   /* boolean promptPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  318.   NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) = 0;
  319.  
  320.   /**
  321.    * Puts up a dialog box which has a list box of strings from which the user
  322.    * may make a single selection.
  323.    *
  324.    * @param aParent
  325.    *        The parent window or null.
  326.    * @param aDialogTitle
  327.    *        Text to appear in the title of the dialog.
  328.    * @param aText
  329.    *        Text to appear in the body of the dialog.
  330.    * @param aCount
  331.    *        The length of the aSelectList array parameter.
  332.    * @param aSelectList
  333.    *        The list of strings to display.
  334.    * @param aOutSelection
  335.    *        Contains the index of the selected item in the list when this
  336.    *        method returns true.
  337.    *
  338.    * @return true for OK, false for Cancel.
  339.    */
  340.   /* boolean select (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */
  341.   NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) = 0;
  342.  
  343. };
  344.  
  345. /* Use this macro when declaring classes that implement this interface. */
  346. #define NS_DECL_NSIPROMPTSERVICE \
  347.   NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText); \
  348.   NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState); \
  349.   NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval); \
  350.   NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  351.   NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval); \
  352.   NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  353.   NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  354.   NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval); \
  355.   NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval); 
  356.  
  357. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  358. #define NS_FORWARD_NSIPROMPTSERVICE(_to) \
  359.   NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) { return _to Alert(aParent, aDialogTitle, aText); } \
  360.   NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) { return _to AlertCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState); } \
  361.   NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) { return _to Confirm(aParent, aDialogTitle, aText, _retval); } \
  362.   NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to ConfirmCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval); } \
  363.   NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) { return _to ConfirmEx(aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval); } \
  364.   NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to Prompt(aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval); } \
  365.   NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to PromptUsernameAndPassword(aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval); } \
  366.   NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return _to PromptPassword(aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval); } \
  367.   NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) { return _to Select(aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval); } 
  368.  
  369. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  370. #define NS_FORWARD_SAFE_NSIPROMPTSERVICE(_to) \
  371.   NS_IMETHOD Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText) { return !_to ? NS_ERROR_NULL_POINTER : _to->Alert(aParent, aDialogTitle, aText); } \
  372.   NS_IMETHOD AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState) { return !_to ? NS_ERROR_NULL_POINTER : _to->AlertCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState); } \
  373.   NS_IMETHOD Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Confirm(aParent, aDialogTitle, aText, _retval); } \
  374.   NS_IMETHOD ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmCheck(aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval); } \
  375.   NS_IMETHOD ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConfirmEx(aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval); } \
  376.   NS_IMETHOD Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Prompt(aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval); } \
  377.   NS_IMETHOD PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptUsernameAndPassword(aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval); } \
  378.   NS_IMETHOD PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->PromptPassword(aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval); } \
  379.   NS_IMETHOD Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Select(aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval); } 
  380.  
  381. #if 0
  382. /* Use the code below as a template for the implementation class for this interface. */
  383.  
  384. /* Header file */
  385. class nsPromptService : public nsIPromptService
  386. {
  387. public:
  388.   NS_DECL_ISUPPORTS
  389.   NS_DECL_NSIPROMPTSERVICE
  390.  
  391.   nsPromptService();
  392.  
  393. private:
  394.   ~nsPromptService();
  395.  
  396. protected:
  397.   /* additional members */
  398. };
  399.  
  400. /* Implementation file */
  401. NS_IMPL_ISUPPORTS1(nsPromptService, nsIPromptService)
  402.  
  403. nsPromptService::nsPromptService()
  404. {
  405.   /* member initializers and constructor code */
  406. }
  407.  
  408. nsPromptService::~nsPromptService()
  409. {
  410.   /* destructor code */
  411. }
  412.  
  413. /* void alert (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  414. NS_IMETHODIMP nsPromptService::Alert(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText)
  415. {
  416.     return NS_ERROR_NOT_IMPLEMENTED;
  417. }
  418.  
  419. /* void alertCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  420. NS_IMETHODIMP nsPromptService::AlertCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState)
  421. {
  422.     return NS_ERROR_NOT_IMPLEMENTED;
  423. }
  424.  
  425. /* boolean confirm (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
  426. NS_IMETHODIMP nsPromptService::Confirm(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRBool *_retval)
  427. {
  428.     return NS_ERROR_NOT_IMPLEMENTED;
  429. }
  430.  
  431. /* boolean confirmCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
  432. NS_IMETHODIMP nsPromptService::ConfirmCheck(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  433. {
  434.     return NS_ERROR_NOT_IMPLEMENTED;
  435. }
  436.  
  437. /* PRInt32 confirmEx (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */
  438. NS_IMETHODIMP nsPromptService::ConfirmEx(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRInt32 *_retval)
  439. {
  440.     return NS_ERROR_NOT_IMPLEMENTED;
  441. }
  442.  
  443. /* boolean prompt (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */
  444. NS_IMETHODIMP nsPromptService::Prompt(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  445. {
  446.     return NS_ERROR_NOT_IMPLEMENTED;
  447. }
  448.  
  449. /* boolean promptUsernameAndPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  450. NS_IMETHODIMP nsPromptService::PromptUsernameAndPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  451. {
  452.     return NS_ERROR_NOT_IMPLEMENTED;
  453. }
  454.  
  455. /* boolean promptPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
  456. NS_IMETHODIMP nsPromptService::PromptPassword(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, PRBool *aCheckState, PRBool *_retval)
  457. {
  458.     return NS_ERROR_NOT_IMPLEMENTED;
  459. }
  460.  
  461. /* boolean select (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */
  462. NS_IMETHODIMP nsPromptService::Select(nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUint32 aCount, const PRUnichar **aSelectList, PRInt32 *aOutSelection, PRBool *_retval)
  463. {
  464.     return NS_ERROR_NOT_IMPLEMENTED;
  465. }
  466.  
  467. /* End of implementation class template. */
  468. #endif
  469.  
  470.  
  471. #endif /* __gen_nsIPromptService_h__ */
  472.